package com.ztgf.commodity.models.service;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;
import com.ztgf.commodity.models.bo.*;
import com.ztgf.commodity.models.dto.CommodityEvaluationDTO;
import com.ztgf.commodity.models.vo.*;

import java.util.List;

/**
 * 商品评价表服务
 *
 * @author chenyu.wang
 * @Date 2020-05-29 15:18:55
 */
public interface ICommodityEvaluationService extends IService<CommodityEvaluationDTO> {

    /**
     * description: 添加评论
     * param: [saveBO]
     * author: chenyu.wang
     * date: 2020-05-29
     * return: boolean
     */
    boolean add(CommodityEvaluationSaveBO saveBO);

    /**
     * description: 统计评论数量
     * param: [id]
     * author: chenyu.wang
     * date: 2020-05-29
     * return: java.lang.Integer
     */
    Integer getCommentsNumber(Long id);

    /**
     * description: 商城商品评价页列表
     * param: []
     * author: chenyu.wang
     * date: 2020-05-29
     * return: java.util.List<com.ztgf.commodity.models.vo.CommodityEvaluationPageVO>
     */
    Page<CommodityEvaluationPageVO> queryEvaluationList(CommodityEvaluationBO bo);

    /**
     * description: 获取店铺好评率,保留2位小数
     * param: []
     * author: zhanghualang
     * date: 2020-06-08
     * return: String
     */
    String getShopPraise(Long shopId);

    /**
     * description: 获取店铺动态评价
     * param: []
     * author: zhanghualang
     * date: 2020-06-08
     * return: CommodityEvaluationScoreVO
     */
    CommodityEvaluationScoreVO getShopScore(Long shopId);

    /**
     * description: 发布评价
     * param: [bo]
     * author: chenyu.wang
     * date: 2020-06-12
     * return: boolean
     */
    boolean addEvaluation(CommodityAddEvaluationBO bo);

    /**
     * description: 追评
     * param: [bo]
     * author: chenyu.wang
     * date: 2020-06-12
     * return: boolean
     */
    boolean addChaseEvaluation(CommodityChaseBO bo);

    /**
     * description: 评价回复
     * param: [bo]
     * author: chenyu.wang
     * date: 2020-06-12
     * return: boolean
     */
    boolean addEvaluationReply(CommodityEvaluationReplyBO bo);

    /**
     * description: 评价管理列表
     * param: [bo]
     * author: chenyu.wang
     * date: 2020-07-03
     * return: com.baomidou.mybatisplus.plugins.Page<com.ztgf.commodity.models.vo.CommodityEvaluationManageVO>
     */
    Page<CommodityEvaluationManageVO> queryEvaluationManageList(CommodityEvaluationManageBO bo);

    /**
     * description: 查看评价详情
     * param: [id]
     * author: chenyu.wang
     * date: 2020-07-03
     * return: com.ztgf.commodity.models.vo.CommodityEvaluationPageVO
     */
    CommodityEvaluationPageVO getViewEvaluationById(Long id);

    /**
     * description: 查询店铺信息页产品评价列表
     * param: [bo]
     * author: chenyu.wang
     * date: 2020-07-24
     * return: com.baomidou.mybatisplus.plugins.Page<com.ztgf.commodity.models.vo.CommodityShopPageEvaluationVO>
     */
    Page<CommodityShopPageEvaluationVO> queryShopPageEvaluation(CommodityEvaluationManageBO bo);

    CommodityEvaluationOneVO queryLeftOrderMsg(Long id);

    boolean deleteEvaluation(Long shopId, Long id);

    List<CommodityEvaluationTwoVO> queryShopAllEvaluation(Long shopId);

    CommodityEvaluationThreeVO queryGoodsEvaluationHeader(Long goodsId);
}
